package com.test.market.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.test.market.dao.BillDAO;
import com.test.market.pojo.Bill;
import com.test.market.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 徒有琴
 */
@Service
public class BillServiceImpl implements BillService {
    @Autowired
    private BillDAO billDAO;

    @Override
    public PageInfo<Bill> getBillList(Bill bill, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize,"b.id desc");
        return new PageInfo<>(billDAO.getBillList(bill),5);
    }
}
